package com.situ.model;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.situ.utils.AuditEntity;
import lombok.Getter;
import lombok.Setter;

import java.util.List;

/**
 *  用户模型
 */

@Getter
@Setter
@TableName("user")
public class User extends AuditEntity {
    @TableId(type = IdType.AUTO)
    private Integer id; //用户id

    private String username; //用户名

    private String password; //密码

    private String phone; //手机号

    private String email; //邮箱

    private String nickname; //昵称

    private String avatar; //头像

    private Integer status; //状态 (1：正常  0：禁用)

    private Integer isDelete; //是否删除 (1：删除  0：正常)

    private Integer roleType; //角色类型 (1:普通用户, 2:VIP用户)

    @TableField(exist = false)
    private List<UserAddress> userAddresses;
}
